<?php

namespace Modules\System\Http\Controllers\Api;

/*
 * 系统级别类
 */
use App\Http\Controllers\Controller;
use Modules\System\Models\SmsModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;

class Sms extends Controller
{

    /**
     * showdoc
     * @catalog 做伴接口
     * @title 发送验证码
     * @description 发送验证码
     * @method post
     * @url http://cheyoukong.1zhetejia.com/System/api/Sms/send?phone=15098888888
     *
     * @param phone 是 string 15098888888
     */
    public function send(Request $request){

        $i = $request->input();
        //发送短信服务
        $data = \Modules\System\Services\Sys\Sms::send($i);
        mdsResponse(200,"发送成功");

    }

    /**
     * showdoc
     * @catalog 做伴接口
     * @title 验证验证码
     * @description 验证验证码
     * @method post
     * @url http://cheyoukong.1zhetejia.com/System/api/Sms/verification?phone=15098888888&code=2345
     *
     * @param phone 否 string 15098888888
     * @param code 否 string 1234
     */
    public function verification(Request $request){

        $i = $request->input();
        \Modules\System\Services\Sys\Sms::verification($i);
        mdsResponse(200,"验证码正确");

    }


}
